package net.csdra.libraryborrowing.service.category;

import net.csdra.libraryborrowing.domain.category.Category;

import java.util.List;

/**
 * Created by msf on 2017/10/12.
 */
public interface CategoryService {
    /**
     * 根据父级获取所有子级分类
     *
     * @param getCategoryByMetaId
     * @return
     */
    public List<Category> getCategoryByMetaId(GetCategoryByMetaId getCategoryByMetaId);

    public Category getCategoryById(GetCategoryById getCategoryById);

    /**
     * 根据当前分类id获取所有父级分类
     *
     * @param getCategoryPath
     * @return
     */
    public List<Category> getCategoryPath(GetCategoryPath getCategoryPath);

    class GetCategoryByMetaId {
        String metaId;

        public String getMetaId() {
            return metaId;
        }

        public void setMetaId(String metaId) {
            this.metaId = metaId;
        }
    }

    class GetCategoryById {
        String id;

        public String getId() {
            return id;
        }

        public void setId(String id) {
            this.id = id;
        }
    }

    class GetCategoryPath {
        String currentCategoryId;

        public String getCurrentCategoryId() {
            return currentCategoryId;
        }

        public void setCurrentCategoryId(String currentCategoryId) {
            this.currentCategoryId = currentCategoryId;
        }
    }
}
